package com.patterns.demo.strategy;

/**
 * Author: SamGroves
 * <p>
 * Description: split方法会根据指定符号分割 返回数组
 * <p>
 * Date: 2017/12/4
 */
public abstract class AbstractCalculator {

    public int[] split(String exp, String opt) {
        String array[] = exp.split(opt);
        int arrayInt[] = new int[2];
        arrayInt[0] = Integer.parseInt(array[0]);
        arrayInt[1] = Integer.parseInt(array[1]);
        return arrayInt;
    }
}
